﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_ProductOrder.aspx.cs"
    Inherits="V5_EShop.Admin.Admin_ProductOrder" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <%=V5.Load.LoadAdminHeader(this) %>
    <script src="/Template/Default/javascript/jquery.min.js" type="text/javascript"></script>
    <script src="/Template/Default/javascript/loading/loading_source.js" type="text/javascript" charset="UTF-8"></script>
    <style>
        .Btn_action
        {
            background:none;
            border:0;
             cursor:pointer;
             color:#4B6888;
            }
    .Btn_action:hover
        {
             color:Red;
            }
    </style>
</head>
<body>
    <table border="0" cellpadding="0" cellspacing="0" class="tablelist" width="100%">
        <tr>
            <td class="headertext" style="padding-left: 14px">
                <div align="left">
                    位置导航：<a class="list_link" href="Admin_Index_Main.aspx" target="main">首页</a> 商品订单管理</div>
            </td>
        </tr>
        <tr>
            <td>
                <a href="Admin_ProductOrder.aspx">管理订单</a>
            </td>
        </tr>
    </table>
    <form id="form1" runat="server">
    <asp:MultiView ID="MultiViewList" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" CssClass="tablelist overlist"
                GridLines="None" OnRowCommand="gvList_RowCommand">
                <HeaderStyle CssClass="headertext" />
                <Columns>
                     <asp:TemplateField HeaderText="订单编号">
                        <ItemTemplate>
                            <%#DataBinder.Eval(Container.DataItem, "BillNo")%>
                        </ItemTemplate>
                    </asp:TemplateField>   
                    <asp:TemplateField HeaderText="订单日期">
                        <ItemTemplate>
                            <%#DataBinder.Eval(Container.DataItem, "CreateDatetime")%>
                        </ItemTemplate>
                    </asp:TemplateField>                   
                     <asp:TemplateField HeaderText="客户" HeaderStyle-Width="100px">
                            <ItemTemplate>                          
                                <%# new V5_EShop._Class.BLL.GZ.BLLGZUser().GetModel(Guid.Parse(Eval("CustomID")+string.Empty)).CustomName%>                                      
                            </ItemTemplate>
                        </asp:TemplateField>
                     <asp:TemplateField HeaderText="金额">
                        <ItemTemplate> 
                            <%# new V5_EShop._Class.BLL.GZ.BLLGZProductOrderItem().getOrderPrice(Eval("ID")+string.Empty) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="备注">
                        <ItemTemplate>
                            <%#DataBinder.Eval(Container.DataItem, "Remark")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="是否积分兑换">
                        <ItemTemplate>
                            <%#(Eval("paystatus")+string.Empty)=="0"?"否":"是"%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderStyle-Width="150px">
                        <ItemTemplate>
                            <asp:Button ID="Button1" runat="server" Text="管理" CommandArgument='<%#Bind("ID") %>'
                                CommandName="view"  CssClass="Btn_action" />
                            <asp:Button ID="Button2" runat="server" Text="删除" CommandArgument='<%#Bind("ID") %>'
                                CommandName="del" CssClass="Btn_action" />  
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" CustomInfoHTML="共%PageCount%页，当前为第%CurrentPageIndex%页，每页%PageSize%条"
                FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页" NextPageText="下一页"
                OnPageChanged="Pager_PageChanged" PageIndexBoxType="DropDownList" PageSize="20"
                PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText="Go"
                TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" Width="100%">
            </webdiyer:AspNetPager>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <table cellpadding="5" cellspacing="1" class="tablelist">
                <tr>
                    <td colspan="2" class="headertext">
                        商品信息
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    产品
                                </td>
                                <td>
                                    单价
                                </td>
                                <td>
                                    数量
                                </td>
                                <td>
                                    金额
                                </td>
                            </tr>
                            <%
                                this.Bind_OrderProduct(m_GZProductOrder.ID.ToString());
                            %>
                            <asp:Repeater ID="rpProductList" runat="server">
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <a href="/product-details-<%#DataBinder.Eval(Container.DataItem,"ProductID") %>.aspx"
                                                target="_blank">
                                                <%#new V5_EShop._Class.BLL.BLLGZProduct().GetModel(Guid.Parse(Eval("ProductID") + string.Empty)).ProductName%></a>
                                        </td>
                                        <td>
                                            <%#DataBinder.Eval(Container.DataItem, "OrderPrice")%>
                                        </td>
                                        <td>
                                            <%#DataBinder.Eval(Container.DataItem, "OrderNumber")%>
                                        </td>
                                        <td>
                                            <%#DataBinder.Eval(Container.DataItem, "OrderMoney")%>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        订单信息
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                    </td>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    订单号码：<%= m_GZProductOrder.BillNo%>下单日期：<%= m_GZProductOrder.CreateDatetime%></td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        客户信息
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                    </td>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td style="width: 25%;">
                                    客户名称：
                                </td>
                                <td>
                                    <%=m_GZUser.CustomName%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    联系电话：
                                </td>
                                <td>
                                    <%=m_GZUser.MobilePhone ?? ""%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Email：
                                </td>
                                <td>
                                    <%=m_GZUser.Email ?? ""%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    购货人地址：
                                </td>
                                <td>
                                    <%=m_GZUser.LinkMan ?? ""%>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    邮政编码：
                                </td>
                                <td>
                                    <%=m_GZUser.PostalCode ?? ""%>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        修改订单状态
                    </td>
                </tr>
                <tr>
                    <td style="width: 15%;">
                    </td>
                    <td>
                        <%--<asp:CheckBox ID="cb2" runat="server" Text="是否已付款" />
                        <asp:CheckBox ID="cb3" runat="server" Text="是否已发货" />--%>
                        <asp:CheckBox ID="cb5" runat="server" Text="是否取消该订单" />
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="btnSave" runat="server" Text="保    存" onclick="btnSave_Click" /><%--
                        &nbsp;<input id="Button1" type="button" value="打印" />--%> 
                        <asp:HiddenField ID="hfID" runat="server" Value="0" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
    </form>
</body>
</html>
  <script>
      $(function () {
          $(".Btn_action").live("click", function () {
              showLoading();
          }); 
      });                   
</script>
